#include<stdio.h>
#include<string.h>
#define N 1000

void count (char s[N],char x)
{
	int i;
	for(i=0;s[i]!='\0';i++)
	{
		if(s[i]==x)
		{
			continue;
		}
		printf("%c",s[i]);
	}
	printf("\n");
	
}
int main ()
{
	char s[N];
	char x;
	while(gets(s)!=NULL)
	{
		scanf("%c",&x);
		getchar();
		count(s,x);
	}
	return 0;
}
